/**
 * 定义应用路由
 */
import React from 'react';
import {
  Router,
  // browserHistory,
  hashHistory,
} from 'react-router';

// 路由配置规则参考： https://github.com/ReactTraining/react-router/blob/v3/docs/guides/RouteConfiguration.md#configuration-with-plain-routes
// 一下部分是由 ICE 相关工具自动生成的路由，请勿随意改变，否则可能会出现一些异常情况
// <!-- auto generated routes start -->
import RoleManage from './pages/RoleManage';
import UserInfo from './pages/UserInfo';
import Dialog from './pages/Dialog';
import BlankLayout from './layouts/BlankLayout';
import Login from './pages/Login';
import HeaderAsideFooterResponsiveLayout from './layouts/HeaderAsideFooterResponsiveLayout';
import Roles from './pages/Roles';
import HeaderAsideFooterLayout from './layouts/HeaderAsideFooterLayout';
import Home from './pages/Home';
import HeaderFooterLayout from './layouts/HeaderFooterLayout';
import RolesManage from './pages/RolesManage'
import NotFound from './pages/NotFound';
const autoGeneratedRoutes = [{
  path: 'RoleManage',
  childRoutes: [],
  component: HeaderAsideFooterResponsiveLayout,
  indexRoute: {
    component: RoleManage
  }
},
{
  path: 'RolesManage',
  childRoutes: [],
  component: HeaderAsideFooterResponsiveLayout,
  indexRoute: {
    component: RolesManage
  }
},  {
  path: 'UserInfo',
  childRoutes: [],
  component: HeaderAsideFooterResponsiveLayout,
  indexRoute: {
    component: UserInfo
  }
}, {
  path: 'Dialog',
  childRoutes: [],
  component: HeaderAsideFooterResponsiveLayout,
  indexRoute: {
    component: Dialog
  }
}, {
  path: 'login',
  childRoutes: [],
  component: BlankLayout,
  indexRoute: {
    component: Login
  }
}, {
  path: 'Roles',
  childRoutes: [],
  component: HeaderAsideFooterResponsiveLayout,
  indexRoute: {
    component: Roles
  }
}, {
  path: '/',
  childRoutes: [{
    path: '*',
    childRoutes: [],
    component: NotFound
  }],
  component: HeaderAsideFooterLayout,
  indexRoute: {
    component: Home
  }
}];
// <!-- auto generated routes end -->

// 自定义路由，如果 path 相同则会覆盖自动生成部分的路由配置
const customRoutes = [];

export default (
  <Router
    history={hashHistory}
    routes={[...autoGeneratedRoutes, ...customRoutes]}
  />
);